import request from '../utils/request.js'

// 用户登录
export function login(data) {
  return request({
    url: '/user-management/auth/login',
    method: 'post',
    data
  })
}

// 验证Token
export function validateToken(token) {
  return request({
    url: '/user-management/auth/validate',
    method: 'get',
    headers: {
      'Authorization': `Bearer ${token}`
    }
  })
}

// 用户登出
export function logout(token) {
  return request({
    url: '/user-management/auth/logout',
    method: 'post',
    headers: {
      'Authorization': `Bearer ${token}`
    }
  })
}
